package com.tinem.platform.module.starter.jpa.entity.network;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.*;
import org.hibernate.annotations.DynamicInsert;
import org.hibernate.annotations.DynamicUpdate;
import javax.persistence.*;
import java.io.Serializable;
import java.util.Date;

/**
 * @author fzh
 * @version v1
 * @program: platform
 * @className IpInfo
 * @description IP地址信息
 * @site
 * @company
 * @create 2021-10-29
 */
@Data
@Entity
@ToString
@DynamicInsert
@DynamicUpdate
@EqualsAndHashCode
@NoArgsConstructor
@AllArgsConstructor
@Table(name="t_ip_info")
@ApiModel("IP地址信息")
public class IpInfo implements Serializable,Cloneable{
    @Id
    @Column(name = "c_ip",nullable=true)
    @ApiModelProperty(name = "ip", value = "编号",required = true)
    private String ip;

    @Column(name = "c_country",nullable=true)
    @ApiModelProperty(name = "country", value = "国家",required = true)
    private String country;

    @Column(name = "c_region",nullable=true)
    @ApiModelProperty(name = "region", value = "地区",required = true)
    private String region;

    @Column(name = "c_province",nullable=true)
    @ApiModelProperty(name = "province", value = "省份",required = true)
    private String province;

    @Column(name = "c_city",nullable=true)
    @ApiModelProperty(name = "city", value = "城市",required = true)
    private String city;

    @Column(name = "c_isp",nullable=true)
    @ApiModelProperty(name = "isp", value = "运营商",required = true)
    private String isp;
    @Version
    @Column(name = "c_revision",nullable=true)
    @ApiModelProperty(name = "revision", value = "乐观锁",required = false)
    private Integer revision;

    @Column(name = "c_created_by",nullable=true)
    @ApiModelProperty(name = "createdBy", value = "创建人",required = false)
    private String createdBy;

    @Column(name = "c_created_time",nullable=true,insertable = false,updatable = false)
    @ApiModelProperty(name = "createdTime", value = "创建时间",required = false)
    private Date createdTime;

    @Column(name = "c_updated_by",nullable=true)
    @ApiModelProperty(name = "updatedBy", value = "更新人",required = false)
    private String updatedBy;

    @Column(name = "c_updated_time",nullable=true,insertable = false,updatable = false)
    @ApiModelProperty(name = "updatedTime", value = "更新时间",required = false)
    private Date updatedTime;

}